#pragma once

#include <string>

struct git_commit;

namespace git
{

class Commit
{
public:
    Commit() {}

    Commit(const Commit &) = delete;

    Commit(Commit &&b);

    ~Commit();

    Commit &operator=(const Commit &) = delete;

    Commit &operator=(Commit &&b);

    bool operator==(const Commit &b) const;

    std::string oidHex() const;

private:
    Commit(git_commit *commit);

private:
    git_commit *commit_ = nullptr;

    friend class Repo;
};

} // namespace git
